package com.gaofeng.day12;

public class demo01 {
    public static void main(String[] args) {
        // 数字加密
        int[] arr = {1,9,8,3};

        String data = jiami(arr);

        // 解密


    }

    private static String jiami(int[] arr) {
        for (int i = 0; i < arr.length; i++) {
            arr[i] += 5;
        }

        for (int i = 0; i < arr.length; i++) {
            arr[i] %= 10;
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]);
        }

        for (int i = 0, j = arr.length-1; i < j; i++,j--) {
            int temp = arr[i];
            arr[i] = arr[j];
            arr[j] = temp;
        }
        System.out.println("");
        String result = "";
        for (int i = 0; i < arr.length; i++) {
            result += arr[i];
        }
        System.out.println(result);
        return result;
    }
}
